package com.lxlg.lxlg_order.infra.mapper;

import com.lxlg.lxlg_order.infra.model.SeckillOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lxlg.lxlg_order.infra.model.parm.SkuIdAndMoney;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author kevin
 * @since 2022-04-28
 */
public interface SeckillOrderMapper extends BaseMapper<SeckillOrder> {
    @Select("SELECT sku_id,goods_num 'sku_id_num',seckill_price 'all_money',merchant_id,merchant_name FROM seckill_order \n" +
            "WHERE seckill_order_code=#{order_payState_complate} AND sale_end_time <#{date}  AND sale_end_time >#{date0}\n ")
    List<SkuIdAndMoney> collectDayStatement(Integer order_payState_complate, Date date0, Date date);
}
